import java.util.ArrayList;
import java.util.Scanner;

public class RoadmapSystem {
    public static void main(String[] args) {

        Graph graph = new Graph(15);
        //存数据
        graph.insertVertex(new Message("东门", "位于重庆电子工程的东门，旁边有小吃街，强烈推荐去瑞赛网吧打游戏，贼便宜", 0));
        graph.insertVertex(new Message("宿舍", "重庆电子工程学子的住宿区，男生6人，女生8人间，上床下桌，非常的巴适", 1));
        graph.insertVertex(new Message("北区食堂", "北区食堂二楼的铁板烧很好吃，我准备在者创业，希望做大做强，再创辉煌", 2));
        graph.insertVertex(new Message("图书馆", "我天天去卷，只不过在2，3楼有自习室，有空调，夏天巴适得很，就是有很多专升本同学，需要占位置", 3));
        graph.insertVertex(new Message("北门", "位于重庆电子工程的北门，是学校的门面，目前不能进出，没得印象", 4));
        graph.insertVertex(new Message("教师公寓", "快递在旁边，疫情过后就封闭了，不对学生开发", 5));
        graph.insertVertex(new Message("快递", "我们住在南区，快递在北区，我愿称之为取快递就是观光全校", 6));
        graph.insertVertex(new Message("南区食堂", "天天吃，都吃腻了，建议吃基础套餐，经济实惠又好吃，就是没得味", 7));
        graph.insertVertex(new Message("羽毛球场", "打过一两次，是露天羽毛球场，夏天有点热", 8));
        graph.insertVertex(new Message("操场", "晚上跑不掉人很多，有很多学妹可以看", 9));
        graph.insertVertex(new Message("篮球场", "没事去打哈篮球，只有一个蓬蓬，还是可以", 10));
        graph.insertVertex(new Message("12栋教学楼", "天天去，每天三点一线，教室->食堂->宿舍，巴适得很", 11));
        graph.insertVertex(new Message("南门", "旁边有个客运总站，去移通很方便，回家都是走南门，坐轻轨", 12));
        graph.insertVertex(new Message("乒乓球场", "打过一两次，没印象", 13));
        graph.insertVertex(new Message("西门", "听说可以翻墙，不知道行不行", 14));
        //存储两点之间的信息
        graph.insertCharEdge("东门", "宿舍", 600);
        graph.insertCharEdge("宿舍", "北区食堂", 450);
        graph.insertCharEdge("宿舍", "图书馆", 500);
        graph.insertCharEdge("宿舍", "南区食堂", 500);
        graph.insertCharEdge("图书馆", "北门", 600);
        graph.insertCharEdge("图书馆", "教师公寓", 300);
        graph.insertCharEdge("图书馆", "快递", 500);
        graph.insertCharEdge("南区食堂", "快递", 1000);
        graph.insertCharEdge("南区食堂", "羽毛球场", 300);
        graph.insertCharEdge("南区食堂", "操场", 200);
        graph.insertCharEdge("南区食堂", "12栋教学楼", 200);
        graph.insertCharEdge("羽毛球场", "乒乓球场", 100);
        graph.insertCharEdge("羽毛球场", "西门", 600);
        graph.insertCharEdge("羽毛球场", "操场", 300);
        graph.insertCharEdge("篮球场", "操场", 400);
        graph.insertCharEdge("篮球场", "12栋教学楼", 200);
        graph.insertCharEdge("12栋教学楼", "南门", 100);
        System.out.println("\t\t欢迎进入重庆电子职业技术学院校园导航系统");
        boolean flag = true;//判断
        Scanner scanner = new Scanner(System.in);
        while (flag) {
            System.out.println("------------------------------------------------");
            System.out.println("\t\t\t\t\t1.景点全览");
            System.out.println("\t\t\t\t\t2.景点导航");
            System.out.println("\t\t\t\t\t3.显示各景点的邻接矩阵");
            System.out.println("\t\t\t\t\t4.退出");
            System.out.print("请输入编号：");
            String s = scanner.nextLine();
            switch (s) {
                case "1":
                    graph.showPoint();
                    break;
                case "2":
                    graph.showAllPoint();
                    break;
                case "3":
                    graph.showGraph();
                    break;
                case "4":
                    flag=false;
                    System.out.println("下次再见！");
                    break;
                default:
                    System.out.println("输入错误，请重新输入！");
            }
        }
    }

}
